<?php

class SiteController extends Controller
{
	public function DoControll()
	{
		$this->CSS( "core" );
		$this->JS( "lib" );
		$this->Title( "Irinori" );
		
		// Get section. Lobby is standard if no section is found.
		$section = $this->view->GetSection();
		$section = ( $section ) ? $section : "Lobby";

		// Load and run section controller.
		$sectionControllerName = ucfirst( strtolower( $section ) ) . "Controller";
		require_once $sectionControllerName . ".php";
		$sectionController = new $sectionControllerName();

		$this->view->BuildSite( $this, $sectionController );
	}
}
